package com.nice.demo.test;


public enum DrawType {
    /// 曲线
    CURVE(0),
     // // 直线
    LINE(1),
    // 点曲线
    DASH(2),
    // 箭头
    ARROW(3),
    // 点直线
    DASHLINE(4),
    // 直角三角形
    TRIANGLE(5),
    // 矩形
    RECTANGLE(6),
    // 梯形
    TRAPEZIUM(7),
    // 椭圆
    OVAL(8),
    // 坐标系
    COORDINATE(9),
    // // 数轴
    NUMBER_AXIS(10),
    //等腰三角形
    ISOSCELESTRIANGLE(11),
    //菱形
    RHOMBUS(12),
    //平行四边形
    PARALLELOGRAM(13);

    private int code = 0;

    private DrawType(int code) {
        this.code = code;
    }

    public int getCode() {
        return this.code;
    }

    public static DrawType toDrawType(int code) {
        DrawType[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            DrawType drawType = var1[var3];
            if (drawType.getCode() == code) {
                return drawType;
            }
        }

        return CURVE;
    }
}
